package org.halk.spring_cloud_stream_demo.streamclient;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

public interface StreamClient {

    String INPUT = "myInput";
    String OUTPUT = "myOutput";

    /**
     * 消息输入通道
     *
     * @return
     */
    @Input(StreamClient.INPUT)
    SubscribableChannel input();

    /**
     * 消息输出通道
     *
     * @return
     */
    @Output(StreamClient.OUTPUT)
    MessageChannel output();
}
